<?php
/* @var $this UserAdminController */
/* @var $model UserAdmin */


$this->breadcrumbs=[
	'帐号管理'=>['index'],
	'列表',
];

$this->menu=[
	['icon' => 'glyphicon glyphicon-home','label'=>'返回列表', 'url'=>['admin']],
	['icon' => 'glyphicon glyphicon-plus-sign','label'=>'创建帐号', 'url'=>['create']],
];

$this->addPageOption(
	BSHtml::button('高级搜索',array('class' =>'search-button', 'icon' => BSHtml::GLYPHICON_SEARCH,'color' => BSHtml::BUTTON_COLOR_PRIMARY), '#')
);

$this->pageTitle='帐号管理';
$this->pageSubTitle='创建并维护系统管理员帐号';


Yii::app()->clientScript->registerScript('search',
    "
    $('.search-button').click(function(){
        $('.search-form').toggle();
            return false;
        });
        $('.search-form form').submit(function(){
            $('#user-admin-grid').yiiGridView('update', {
            data: $(this).serialize()
        });
        return false;
    });"
);
?>

<div class="row">
	<div class="col-lg-12">
		<div class="panel panel-danger">
			<div class="panel-heading">
				<h4>管理员列表</h4>
				<div class="options">
					<a href="<?php echo $this->createUrl('create');?>"><i class="glyphicon glyphicon-plus-sign">创建新的管理员</i></a>
			    </div>
			</div>
			<div class="panel-body">
		        <div class="search-form" style="display:none">
		            <?php $this->renderPartial('_search',[
		                'model'=>$model,
		            ]); ?>
		        </div><!-- search-form -->
		
		        <?php $this->widget('bootstrap.widgets.BsGridView',[
		        	'id'=>'user-admin-grid',
		        	'dataProvider'=>$model->search(),
		        	'type'=>'table bordered striped',
		        	'columns'=>[
						'user_name',
						'realname',
						'user_id',
						'create_time',
						'status',
		        		[
		        			'class'=>'bootstrap.widgets.BsButtonColumn',
		        		],
					]
				]); ?>
			</div> <!-- end panel-body -->
		</div>
	</div>
</div> <!-- end row -->
	    




